package com.crm.model.dto;

import com.crm.model.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author zjd
 * @Title:
 * @Description:
 * @date 2021/4/214:32
 */
@Data
public class PaperDTO {
    /**
     * 试卷id
     */
    @NotNull(message = "必填字段不能为空")
    //@JsonFormat(shape = JsonFormat.Shape.STRING)
    @Min(value = 1,message = "最小值不能为0")
    private Long id;
    /**
     * 试卷名
     */
    @NotNull(message = "必填字段不能为空")
    private String name;
    /**
     * 试卷类型
     */
    @NotNull(message = "必填字段不能为空")
    private Long paperType;
    /**
     * 试卷难度
     */
    @NotNull(message = "必填字段不能为空")
    private Long difficuty;
    /**
     * 总分
     */
    @NotNull(message = "必填字段不能为空")
    private BigDecimal score;
    //若需要嵌套校验则在需要校验的结构体上添加@Valid
   /* @Valid
    private List<User> users;*/
}

